package cn.sjxy.regi.service;

import cn.sjxy.regi.pojo.ShoppingCart;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ClassName:ShoppingCartService
 * Package:cn.sjxy.regi.controller
 * Description:
 *
 * @Date:2022/6/25 17:55
 * @Author:SXW
 */
@Service
public interface ShoppingCartService extends IService<ShoppingCart> {


    List<ShoppingCart> getCart();

    /**
     * 添加一份
     *
     * @param shoppingCart
     * @return
     */
    ShoppingCart add(ShoppingCart shoppingCart);

    /**
     * 减少一份
     *
     * @param shoppingCart
     * @return
     */
    ShoppingCart sub(ShoppingCart shoppingCart);

    /**
     * 清空购物车
     */
    void clearShoppingCart();
}
